package com.tsing.wms.constant;

/**
 * @author TheTsing
 */
public class AuthConsts {

    /**
     * redis存储token的key的前缀
     */
    public static final String REDIS_TOKEN_PREFIX = "user_token_";

    /**
     * redis存储权限列表的key的前缀
     */
    public static final String REDIS_PERMISSION_PREFIX = "permission_";

    /**
     * 请求头携带鉴权信息的key
     */
    public static final String AUTHENTICATION_HEAD = "token";

    /**
     * 用户密码md5加密次数
     */
    public static final int PASSWORD_MD5_COUNT = 3;

    /**
     * 用户默认密码
     */
    public static final String DEFAULT_PASSWORD = "123456";

    /**
     * redis存储用户登录失败次数的key的前缀
     */
    public static final String REDIS_LOGIN_COUNT_PREFIX = "login_count_";

    /**
     * redis存储用户登录失败次数的key的过期时间
     */
    public static final long LOGIN_COUNT_EXPIRE = 900L;

    /**
     * 用户登录失败次数最大限制
     */
    public static final int LIMIT_LOGIN_ACCOUNT = 5;

}
